import Vue from 'vue'
import {
  Button,
  NavBar,
  Tabbar,
  TabbarItem,
  Toast,
  Search,
  Swipe,
  SwipeItem,
  Grid,
  GridItem,
  Divider,
  Sticky,
  PullRefresh,
  Sidebar,
  SidebarItem,
  Image,
  Card,
  Empty,
  Lazyload,
  Icon,
  DropdownMenu,
  DropdownItem,
  Loading,
  GoodsAction,
  GoodsActionIcon,
  GoodsActionButton,
  Sku,
  Form,
  Field,
  Cell,
  CellGroup,
  Dialog,
  AddressList,
  Checkbox,
  CheckboxGroup,
  AddressEdit,
  ContactCard,
  Tag,
  Stepper,
  SubmitBar,
  Popup,
  Step,
  Steps,
  Tab,
  Tabs,
} from 'vant'

Vue.use(Tab)
Vue.use(Tabs)

Vue.use(Step)
Vue.use(Steps)

Vue.use(Popup)
Vue.use(SubmitBar)

Vue.use(Stepper)

Vue.use(Tag)
Vue.use(ContactCard)
Vue.use(AddressEdit)
Vue.use(Checkbox)
Vue.use(CheckboxGroup)

Vue.use(AddressList)
Vue.use(Cell)
Vue.use(CellGroup)
Vue.use(Dialog) // Vue.prototype.$dialog = xxx

Vue.use(Form)
Vue.use(Field)

Vue.use(Sku)
Vue.use(GoodsAction)
Vue.use(GoodsActionButton)
Vue.use(GoodsActionIcon)
Vue.use(Loading)
Vue.use(DropdownMenu)
Vue.use(DropdownItem)
Vue.use(Lazyload)
Vue.use(Icon)

// 注册时可以配置额外的选项
Vue.use(Lazyload, {
  lazyComponent: true,
})

Vue.use(Empty)

Vue.use(Card)
Vue.use(Image)
Vue.use(Sidebar)
Vue.use(SidebarItem)
Vue.use(PullRefresh)
Vue.use(Toast) // Vue.prototype.$toast
Vue.use(NavBar)
Vue.use(Button)
Vue.use(Tabbar)
Vue.use(TabbarItem)
Vue.use(Search)
Vue.use(Sticky)

Vue.use(Swipe)
Vue.use(SwipeItem)
Vue.use(Grid)
Vue.use(GridItem)
Vue.use(Divider)
